import java.util.Scanner;
public class ArrayReduce {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		char choose;
		int[] arr = {1,2,3,4};
		do{
			int[] arr2 = new int[arr.length - 1];
			for(int i = 0; i < arr2.length; i++){
				arr2[i] = arr[i];
			}

			arr = arr2;
			
			for(int i = 0; i < arr.length; i++){
				System.out.print(arr[i] + " ");
			}

			System.out.println("是否继续删除");
			choose = scanner.next().charAt(0);
			if(arr.length <=1 || choose != 'y'){
				break;
			}

		}while(true);
	}
}